home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / fractal / kaos.lha / fixptlib / fp_get_attributes.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-18  |  779 b   |  45 lines

  1. /*
  2. ### assign color and symbol type to a given periodic orbit or equilibria ###
  3. */
  4.  
  5. #include "../include/main_kaos_def.h"
  6. fp_get_attributes(s,color,s_type,fp_type)
  7. int *color,*s_type,fp_type;
  8. char *s;
  9. {
  10.     extern int my_colormap_size;
  11.  
  12.     switch(fp_type){
  13.         case 0:
  14.             sprintf(s,"SADDLE");
  15.             *color = Green;
  16.             *s_type = CROSS;
  17.             break;
  18.         case 1:
  19.             sprintf(s,"SOURCE");
  20.             *color = Red;
  21.             *s_type = SQUARE;
  22.             break;
  23.         case -1:
  24.             sprintf(s,"SINK");
  25.             *color = Blue;
  26.             *s_type = TRIANGLE;
  27.             break;
  28.         case 2:
  29.             sprintf(s,"SPIRAL SOURCE");
  30.             *color = Red;
  31.             *s_type = SQUARE;
  32.             break;
  33.         case -2:
  34.             sprintf(s,"SPIRAL SINK");
  35.             *color = Blue;
  36.             *s_type = TRIANGLE;
  37.             break;
  38.         default:
  39.             sprintf(s,"NONE");
  40.             *color = my_colormap_size-1;
  41.             *s_type = DOT;
  42.             break;
  43.     }
  44. }
  45.